local CallEntity = require("gameLogic.fight.fightEntity.CallEntity")
local StandingEntity = class("StandingEntity", CallEntity)

-- 肉桩角色
function StandingEntity:ctor(excuter, id, element)
    StandingEntity.super.ctor(self, excuter, nil, id, element)
end

function StandingEntity:isFight()
    return false
end

function StandingEntity:checkHatred(camp)
    if not self:isDie() and self:getCamp() ~= camp then
        return true
    end
    return false
end

function StandingEntity:beHurt(hurt, battleReport)
    if self:isDie() then
        return
    end
    local AttributeConst = require("const.AttributeConst")
    local blood = self:getAttrValue(AttributeConst.BLOOD)
    if hurt.element == AttributeConst.ELEMENT_TREATMENT then
    else
        local retHurt = hurt.value
        blood = blood - retHurt
        printDebug(self:getDebugName() .. " 受到伤害 " .. retHurt .. " 血量:" .. blood)
    end
    self:_setAttrValue(AttributeConst.BLOOD, blood)
    self:setDie(blood <= 0)
    battleReport:addHurt(hurt, self)
end

return StandingEntity
